---
order: 14
category: '@threlte/xr'
title: 'useXR'
type: 'hook'
---

Provides context about the current WebXR session.

```svelte
<script>
  import { useXR } from '@threlte/xr'

  const { isPresenting, isHandTracking, session } = useXR()
</script>
```

### Signature

```ts
const {
  // Readable<boolean> - Whether the XR device is presenting in an XR session
  isPresenting,
  // Readable<boolean> - Whether hand tracking inputs are active
  isHandTracking,
  // Readable<XRSession | undefined> - The active `XRSession`
  session
} = useXR()
```
